# from selenium.webdriver.support.ui import Select # Select模块
# Select(下拉框定位).select_by_index() # 根据下标选择
# Select(下拉框定位).select_by_value() # 根据 选项的 value 属性值 选择
# Select(下拉框定位).select_by_visible_text() # 根据 选项的 文本信息选择


from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import Select
import time

d = webdriver.Chrome()
d.get('http://192.168.0.125:9009/wp-login.php')
d.maximize_window()

username = d.find_element(By.CSS_SELECTOR, '[name="log"]')
username.send_keys('admin')

password = d.find_element(By.CSS_SELECTOR, '[name="pwd"]')
password.send_keys('admin123')
time.sleep(3)
login = d.find_element(By.CSS_SELECTOR, '[name="wp-submit"]')
login.click()
time.sleep(3)
